#;-*-C-*-

# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
# This is a small cosmology simulation that runs to z = 0.
# The redshift outputs can be used to create a light-cone out to z = 0.1.
#
# define problem
#
ProblemType                = 30      // cosmology simulation
TopGridRank                = 3
TopGridDimensions          = 32 32 32
SelfGravity                = 1       // gravity on
TopGridGravityBoundary     = 0       // Periodic BC for gravity
LeftFaceBoundaryCondition  = 3 3 3   // same for fluid
RightFaceBoundaryCondition = 3 3 3

#
# problem parameters
#
CosmologySimulationOmegaBaryonNow       = 0.0441
CosmologySimulationOmegaCDMNow          = 0.2239
CosmologySimulationDensityName           = GridDensity
CosmologySimulationVelocity1Name         = GridVelocities_x
CosmologySimulationVelocity2Name         = GridVelocities_y
CosmologySimulationVelocity3Name         = GridVelocities_z
CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
CosmologySimulationCalculatePositions    = 1
CosmologySimulationNumberOfInitialGrids  = 2
CosmologySimulationGridDimension[1]      =               10               14               14
CosmologySimulationGridLeftEdge[1]       =          0.40625            0.375          0.34375
CosmologySimulationGridRightEdge[1]      =           0.5625          0.59375           0.5625
CosmologySimulationGridLevel[1]          = 1    
CosmologySimulationUseMetallicityField   = 1

#
# cosmology parameters
#
ComovingCoordinates        = 1
CosmologyOmegaMatterNow    = 0.268
CosmologyOmegaDarkMatterNow = 0.2239
CosmologyOmegaLambdaNow    = 0.732
CosmologyHubbleConstantNow = 0.704
CosmologyComovingBoxSize   = 32.0
CosmologyMaxExpansionRate  = 0.02
CosmologyInitialRedshift   = 50
CosmologyFinalRedshift     = 1.8
GravitationalConstant      = 1

#
# I/O and stop/start parameters
#
dtDataDump       = 5
RedshiftDumpName = RD
RedshiftDumpDir  = RD
DataDumpName     = DD
DataDumpDir      = DD
OutputCoolingTime = 1
OutputTemperature = 1

#
# hydro parameters
#
HydroMethod                 = 0       // PPM
Gamma                       = 1.6667
PPMDiffusionParameter       = 0       // diffusion off
DualEnergyFormalism         = 1       // use total & internal energy
InterpolationMethod         = 1       // SecondOrderA
FluxCorrection              = 1
ConservativeInterpolation   = 1
CourantSafetyNumber         = 0.5
ParticleCourantSafetyNumber = 0.8
UseMinimumPressureSupport   = 0

#
# grid refinement parameters
#
StaticHierarchy                       = 0
MaximumRefinementLevel                = 5
MaximumGravityRefinementLevel         = 5
MaximumParticleRefinementLevel        = 5
RefineBy                              = 2
CellFlaggingMethod                    = 2 4 8
MinimumOverDensityForRefinement       = 1.0 1.0
MinimumMassForRefinementLevelExponent = 0.0 0.0
MinimumEfficiency                     = 0.35
MustRefineParticlesCreateParticles = 3
MustRefineParticlesRefineToLevel   = 1
CosmologySimulationParticleTypeName          = RefinementMask
    
#
# microphysics parameters
#
RadiativeCooling        = 1
use_grackle             = 1
MultiSpecies            = 0 // sets grackle.primordial_chemistry
MetalCooling            = 1 // sets grackle.metal_cooling
grackle_data_file       = CloudyData_UVB=HM2012.h5
UVbackground            = 1
CMBTemperatureFloor     = 1 // sets grackle.cmb_temperature_floor

#
# star formation parameters
#
StarParticleCreation          = 1
StarParticleFeedback          = 1
StarMakerOverDensityThreshold = 100
StarMakerMinimumMass          = 1e6
StarMakerMinimumDynamicalTime = 1e6
StarMakerMassEfficiency       = 0.1
StarMassEjectionFraction      = 0.25
StarMetalYield                = 0.1
StarEnergyToThermalFeedback   = 1e-5
StarFeedbackDistRadius        = 1
StarFeedbackDistCellStep      = 3

#
# some global parameters
#
GreensFunctionMaxNumber = 40
ParallelRootGridIO      = 1
ParallelParticleIO      = 1
